#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>


char ch2[100001];
char ch1[11];
char* str;
char in[11];

int main()
{
	int len1 = strlen(ch1);
	int len2 = strlen(ch2);

	scanf("%s", &ch1);
	scanf("%s", &ch2);
	int count = 0;
	int mete = 0;

	while ()
	{
		str = strstr(ch2, ch1);
		if((str - ch2)>mete)
			mete = str - ch2;
		if (str != NULL)
			count++;
		strcat(in, &ch2[mete+len1]);
		for (int i = 0; i < len2; i++)
			ch2[i] = 0;
		srtcpy(ch2, in);

	}	
	if (str == NULL)
	{
		printf("-1");
		return 0;
	}
	else
	{
		printf("%d ", count);
		printf("%d", mete);
	}
	return 0;
}